home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Arsenal Files 6
/
The Arsenal Files 6 (Arsenal Computer).ISO
/
os2
/
dmp105.zip
/
DMP.DOC
< prev
next >
Wrap
Text File
|
1996-03-09
|
17KB
|
337 lines
Dual Module Player for OS/2 1.041
---------------------------------
This is a port of Otto Chrons' Dual Module Player 4.0 (a DOS program) by
Julien Pierre.
Dual Module Player is a program for playing music modules on different
sound systems on IBM PC compatible machines. It uses DSMI sound
programming interface (Digital Sound & Music Interface) to achieve
high quality sound and wide sound card support.
Currently DMP supports following module formats:
MOD,NST The original Amiga module format (SoundTracker,
NoiseTracker). Also supported by many PC trackers.
Original format supported only 4 channels but many
variants can support up to 32 channels.
STM,S3M Scream Tracker format. S3M can support up to 16
channels while STM is limited to 4.
669 Composer669 module format using 8 channels.
FAR Farandole tracker format capable of using 16 channels.
MTM MultiTracker format. It's a MOD variant with up to 32
channels.
AMF DSMI's internal module format. You can convert all the
previous formats to AMF with M2AMF but not vice versa.
Using AMF format saves you disk space because AMFs are
usually smaller than other module formats. DMP can
also load AMFs faster than other formats. But remember
that you cannot play AMFs on any other player, nor can
you convert AMFs back to any other format.
The command-line syntax is the following :
DMP module [/8] [/16] [/11K] [/22K] [/44K] [/MONO] [/STEREO] [/RANDOM]
[/AMP={NONE,AUTO,LOW,MEDIUM,HIGH}] [/QUALITY] [/NOQUALITY] [/VOL={0-100}]
[/DRIVER={DART,FILE,MMPM2,NOSOUND}] [/FILENAME=name] [/DARTBUFFER=size]
[/LOOP] [/NOPLAY]
All the parameters in [] are optional. The order is not relevant.
The only parameter you have to specify is the module filename.
By default, DMP will try to use DART using quality mode, and AUTO
amplification level. It will also try to find the best capabilities for your
soundcard. Priority is in this order : stereo, resolution, then sampling rate.
For example, that means DMP will choose stereo 8-bit 44kHz over mono
16-bit 44kHz, even though they are the same data rate.
If you specify the sampling rate, resolution, or stereo via the command-line,
this autodetection is disabled.
If DMP can't initialize DART, it will automatically try MMPM2 mode.
If you specify a driver via the command line, DMP will only use this one
and not try any other driver.
DMP will report an error if it cannot initialize the soundcard.
You can get an explanation on the parameters by typing DMP without any
parameter.
Here are some additional information :
/8 : switches to 8-bit mode. Default is 16-bit.
Using 8-bit mode degrades the quality. It doesn't decrease the CPU usage -
except if you use the MMPM/2 sound driver.
You should only use this if you have an 8-bit soundcard like an original
Soundblaster or Soundblaster Pro.
/16 : switches to 16-bit mode, which is the default. 16-bit samples give
a better sound quality and should be used if your soundcard is
capable of 16-bit sound.
/MONO : sets monophonic mode. Default is stereophonic.
Using this option will divide the CPU time required by two.
/STEREO : sets stereophonic mode, which is the default.
/NOQUALITY : disables quality mode. Default is quality mode.
Quality mode was originally implemented only on 8-bit sounds cards to
overcome the dynamic limitation of 8-bits. It uses 16-bit mixing
routines to achieve 96dB dynamic range (instead of 48dB) and post
processes the 16-bit data into 8-bits with a look-up table that
amplifies the sound. Because of this post processing, the Quality mode
takes more processor power but it's worth it. To further amplify the
sound you can use '/AMP=level' command line option.
The sound drivers only support quality mode when mixing at 8 bit.
Initialization will fail if you try /8 in conjunction with /NOQUALITY.
For 16-bit cards there's no need to use Quality mode to improve the
quality of the sound. But with up to 32 channels the dynamics of
individual channels go worse i.e. the volume is lower. You can of
course select an amplification option in the sound setup to amplify the
sound but there is always a risk of click and noise if the sound
overruns. This is where 16-bit Quality mode comes in. It uses a
temporary 32-bit buffer to do the mixing and post processes the buffer
by clipping values that can't fit to 16-bits.
/QUALITY : enables quality mode, which is the default.
/DRIVER=name : sets the sound driver. May be DART (default), MMPM/2, or FILE.
/DRIVER=MMPM2 :
If DMP cannot initialize DARt, it will use the MMPM/2 sound driver which
should work on all soundcards supported by MMPM/2. However, this requires a
lot of memory for buffering, and also a lot of CPU. Because of buffering, the
response to keyboard commands will be delayed - from 4 seconds in 16-bit 44
kHz stereo mode to about one minute if you use 8-bit 11 kHz mono mode (I
strongly discourage you from using this one !). Also, there will be a
corresponding delay before the sound begins. So be patient when using
low-quality modes ! Don't e-mail me to say you don't hear anything.
The initial delay is due to a bug in MMPM/2 that I bypassed by putting 800
KB of blank data at the beginning. If IBM solves this one, I could remove it.
However, the delay in response cannot be suppressed when using MMPM/2
playlists. The delay doesn't apply to the volume command, which controls the
hardware setting of the soundcard.
/DRIVER=DART :
To overcome these limitations, IBM created DART - Direct Audio real-time.
It allows much faster access to the soundcard, and real-time as the name says.
It has none of the drawbacks of MMPM/2 playlists mentioned above.
There will be no initial delay and the keyboard response should be instant.
The problem with DART is that it hasn't been officially released. To use it,
you need two DLLs from the Entertainment Toolkit that is found on
Developer's Connection Volume 8 - new versions of AMPMXMCD.DLL and AUDIOSH.DLL.
I was told they could be found at
http://www.polsci.wvu.edu/Henry/Files/dart.zip
Download at your own risk.
Another problem is that it doesn't work well with all soundcards (see the
/DARTBUFFER parameter), and some cards will require new drivers.
IBM still hasn't answered me about the distribution of the DART DLLs - I
don't know if I am allowed to distribute them with my application. In doubt,
I didn't put them. So sadly you'll have to get a Devcon 8 to use DMP in DART
mode.
/DRIVER=FILE :
This sound driver directs output to the hard disk, just as in the first alpha
of DMP that was released in August. By default it goes to TEST.WAV, but you
can change this with /FILENAME=name.
The volume command has no effect in this mode.
/DRIVER=NOSOUND :
This is a fake sound driver. There is no output when using that driver. It's
mostly there for testing. You can also use it with /NOPLAY to test if your
modules are loadable with DMP.
/NOPLAY :
Prevents DMP from playing the file. In this mode, DMP will just load the files
given at the command line without playing them or prompting for keyboard.
It's useful to test if your modules are compatible with DMP. If you don't want
DMP to take the sound card, use /DRIVER=NOSOUND.
/DARTBUFFER=size :
This parameter sets the size of the DART buffer.
By default, DMP will use the value suggested by the soundcard driver.
If you have problems with the sound (distortion, or sound stops under heavy
system load), you can override it. Be careful with that parameter.
The current beta of DART (from Devcon 8/9) can crash OS/2 entirely when using
incorrect parameters. It does this if I use a small buffer (<512 bytes) or
large (>64K). Beware that the higher the buffersize, the less real-time DMP
will be.
If you can't get it to work right, try running DMP in MMPM/2 mode instead.
New soundcard drivers may also solve the problem.
/LOOP :
This mode will make the module loop forever. You'll have to type ESC to stop it.
:songlist : plays a list of files.
This option will make DMP play each module listed in the "songlist" file.
It must be an ASCII file containing the full name of each module with relative
paths. You can include wildcards inside songlists.
/RANDOM : will play the modules in random order.
/VOL=xxx : sets the volume to xxx at the beginning of the program, with
0<=xxx<=100.
/MOD : when this switch is on, DMP will assume that a file is a 15-channel
MOD when it doesn't recognize its format. By default it will report an error.
This is needed because these modules do not have a signature.
Beware : if you try to load non-MOD files, it might crash the program.
I think that's it.
GREETINGS
---------
I have to thank many people for their testing of DMP. If you have been
forgotten, I'm sorry. I'll put you in the next version ;)
Oc, Culus, Nightboob, Os2wizard, dandaman, rwg, hrbeing, Timur Tabi, alav,
Linden deCarmo.
I must say the OS/2 porting was a real nightmare. It lasted 17 months,
but it made me about 10 years older even though I'm only 19.
CONTACTING THE AUTHOR
---------------------
I can be contacted on the internet as madbrain@ibm.net.
I don't have a snail mail address/phone at this time, because I just moved
to Sarasota, Florida and am at a motel until I find a nice appartment (I know,
I wrote in the 1.04 doc that I would move in June only, but I had probably not
slept the night I did that version :-)).
You can also find me as "madbrain" on Internet Relay Chat (check that it is
my address in ".fr" as other people are using this nickname also).
You can usually find the latest release version of DMP on hobbes.nmsu.edu.
Betas will be available from my homepage at
http://www.polsci.wvu.edu/Henry/Madbrain
BUGS
----
No program is 100% bug free and DMP is no exception, but I have been fighting
with bugs very hard before releasing it - that's why it took so much time.
If you ever used the alphas of DMP that I posted on Hobbes, you can see the
huge improvement. I have been congratulated about its stability indeed.
When reporting a bug, please always mention which soundcard you are using,
with the version of the driver, the version of MMPM/2 and OS/2.
Known bugs :
- Users have reported various problems when using some soundcards :
* PAS/16. Here is my advice for this card : use the DART DLLs and the
/DARTBUFFER=16384 parameter. MMPM2 mode may or may not work correctly.
* SB Pro. Volume control is reportedly screwed. But CL isn't developing
the SB Pro drivers anymore.
* SB AWE 32
* GUS. I'm told you should use ULTRA085 for DMP to work with it.
Others have had great success with those, so I don't really know what to
do. It seems to depend a lot on the driver. Actually I have regular SB16s in
both of my machines so I can't test them all myself.
I'm going to fix DMP for the PAS/16 at least as my mother has one in her PC.
I wish the SB Pro driver would load with a SB16, but there is a hardware
check and it doesn't. For SB AWE and GUS, you're on your own - unless you
want to offer me one. You have my address afte all !
- In MMPM/2 mode, the module stops before it is finished. That's because of
MMPM/2 buffering. It will eventually be corrected, but I recommend using
DART wherever possible.
- a few modules will still crash DMP. But they also crash DMP for DOS :-)
* New SB "DART" drivers.
I have been in contact with the driver author at Creative. He says it
they work fine as long as you set the DARTBUFFER at half the size of
the DMA buffer set in CONFIG.SYS on the command-line of your driver.
Doesn't sound very practical to me ! It looks like the previous (Warp)
SB drivers were more DART-compliant !
REVISION HISTORY
----------------
1.0, released November 30th, 1995 : initial release.
1.01, released December 5th 1995 : bugfix in the initialization routine,
addition of songlist mode.
1.02, released December 11th 1995 :
- addition of wildcard support (including inside songlists)
- "@" character for songlists was replaced by ":" since "@" can be used in
filenames
- addition of "/VOL=" option to set volume on startup
- you can now use any number of songlists and files on the command line
- addition of the "Q" key to exit the program instead of going to the next
module
- addition of random playing mode with /RANDOM
1.03, released December 19th 1995 :
- correction of a small bug in file parsing introduced in 1.02.
Apparently I was the only one to discover it.
- separation of the DSMI interface and the sound drivers.
DSMI is now compiled with Watcom instead. As a result :
* some corrupted modules which previously caused DMP to crash
will now load. This is because of differences between the IBM &
Watcom runtime libraries.
* no more bug in looping mode. I still have to figure out why,
though :-)
- the sound drivers remain compiled with IBM C Set ++ because I
can't get the Warp Toolkit to work with Watcom correctly, and
some of my C++ doesn't work with it also.
- small modification in DART volume command. *might* correct a
problem with DART & SB Pro. I need feedback on this.
- DSMI for OS/2 should now be at the exact same level of
stability as the DOS version.
- Phone bill to pay now $3000 :-(
1.04, released February 10th 1996 :
- added the /MOD parameter to assume 15-channel MOD file.
- removed some debug code in the DART sound driver that caused beeps to
be generated on the PC speaker.
- added support for /16, /STEREO and /QUALITY parameters to make the
command-line more consistent.
- corrected a bug in memory deallocation that caused a crash.
- added support for the NOSOUND driver via /DRIVER=NOSOUND.
- added the /NOPLAY parameter.
- made DETECT mode the default and removed the /DETECT parameter.
- added information about the sound driver loaded by DMP and its settings.
- corrected a bug in the FILE driver which appeared when overriding the output
file name.
- modified the DART driver to use the suggested buffer value instead of 4096.
- corrected a bug in the S3M loader which sometimes caused an exception at
the end of a module.
- compiled with C Set ++ 2.1 again
1.041, released March 9th 1996 :
- fixed a stupid bug in command-line parsing that was optimized in 1.04. It
prevented some parameters from being accepted, like /VOL=xx where xx had more
than one digit.
- added the M2AMF utility to convert modules to the AMF format, which takes less
space. Keep in mind you can only play those with DMP, and the conversion only
works one way.
- played with compiler optimizations a bit to reduce EXE/DLL size. I hope it
still works :-)
UPCOMING FEATURES
-----------------
I may or may not do the following :
- code a PM graphical user interface for DMP
- add the .XM module format
- write a MMPM/2 IO Procedure for modules so that they are supported
automatically in all MMPM/2 applications.
- port the textmode interface of DOS DMP to OS/2
- rewrite the MMPM/2 driver so that the buffering problem is gone
- change the driver model to an extensible object-oriented architecture,
so that someone can write a driver for native GUS for example.
- add support for the older SBOS2.SYS driver. This would make DMP work
on SB clone cards that don't have an OS/2 driver.
- modify the multimedia drivers so that system sounds can interupt the
module playing.
- integrate DSMI with the IBM Real-Time MIDI subsystem to make audio/music
synchronization possible.
- modified the sound drivers to return an error when noquality 8-bit mode
was request. Trying this on previous versions produced an exception.
LICENSE
-------
Dual Module Player for OS/2 is a freeware program.
Dual Module Player is copyrighted by me and Otto Chrons.
You are only allowed to distribute it in its original form.
Programmers interested in using modules in their OS/2 programs should look at
the DSMI.OS2 file. DSMI is a commercial library, not freeware.